package commenTest;

import com.oJudge.MainApplication;
import com.oJudge.utils.Logger;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;


@SpringBootTest(classes = MainApplication.class)
@Slf4j
public class testStream {

    private List<String> testStringList = new ArrayList<>();

    @Test
    public void testOutput() {
        testStringList.forEach(Logger::info);
    }

    @Test
    public void testFilter() {
        List<String> list = testStringList.stream().filter(s -> !s.equals("1")).collect(Collectors.toList());
        Logger.info(list.toString());
    }

}
